﻿<%@ Page Title="" Language="C#" MasterPageFile="~/back/Site.master" AutoEventWireup="true" CodeFile="builderWork.aspx.cs" Inherits="back_builderWork" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<script type="text/javascript">
    $(document).ready(function () {
        $("input:checkbox, input:radio, input:file").not('[data-no-uniform="true"],#uniform-is-ajax').uniform();
    });
    </script>
    <div class="page-header">
        <h1>
            Add Builder Work</h1>
    </div>
    <div id="divMessage" runat="server">
    </div>
    <div style="float:left; width:50%;">
        <div class="control-group">
            <label class="control-label">
                Project Name</label>
            <div class="controls">
                <asp:TextBox ID="txtProjectName" runat="server" CssClass="input-xlarge"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvFirmName" runat="server" ErrorMessage="*" ForeColor="Red"
                    ControlToValidate="txtProjectName" Display="Dynamic" ValidationGroup="SubmitBuilder"></asp:RequiredFieldValidator>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                Project Image</label>
            <div class="controls">
                <asp:FileUpload ID="uplArchitectWorkImage" runat="server" class="input-file uniform_on" />
                <div id="divimage" runat="server" visible="false">
                    <a id="aviewimage" runat="server" style="display: none;" target="_blank">View Image</a></div>
            </div>
            <asp:HiddenField ID="hfArchitectImageName" runat="server" />
        </div>
        <div class="control-group">
            <label class="control-label">
                Description</label>
            <div class="controls">
                <asp:TextBox ID="txtDescription" TextMode="MultiLine" Rows="5" runat="server" CssClass="input-xlarge"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvFirstname" runat="server" ForeColor="Red" ErrorMessage="*"
                    ControlToValidate="txtDescription" Display="Dynamic" ValidationGroup="SubmitBuilder"></asp:RequiredFieldValidator>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                City</label>
            <div class="controls">
                <asp:TextBox ID="txtCity" runat="server" CssClass="input-xlarge"></asp:TextBox>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                State</label>
            <div class="controls">
                <asp:TextBox ID="txtState" runat="server" CssClass="input-xlarge"></asp:TextBox>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                Year</label>
            <div class="controls">
                <asp:TextBox ID="txtYear" runat="server" CssClass="input-xlarge"></asp:TextBox>
            </div>
        </div>
    </div>
    <div style="float:left; width:50%;">
        <div class="control-group">
            <label class="control-label">
                Builder Works</label>
            <div class="controls">
                <asp:GridView ID="grdBuilderWorks" runat="server" ShowFooter="false" AutoGenerateColumns="false"
                    CssClass="table table-striped table-bordered">
                    <Columns>
                        <asp:TemplateField HeaderText="Project Name">
                            <ItemTemplate>
                                <%#Eval("Name") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Description">
                            <ItemTemplate>
                                <%#Eval("DescriptionLine") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="City, State, Year">
                            <ItemTemplate>
                                <%#Eval("City") %>, <%#Eval("State") %>, <%#Eval("Year") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Image">
                            <ItemTemplate>
                                <img src="../builderWorks/<%#Eval("BuilderId") %>/<%#Eval("ProjectImage") %>" width="90" />
                                <div id="archWorkImage" style="display: none;">
                                    <a id="ancWork" runat="server">View Image</a>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>
        </div>
    </div>
    <div class="clearfix">
        &nbsp;</div>
    <div class="form-actions">
        <asp:Button ID="btnSubmit" runat="server" CssClass="btn btn-primary" Text="Submit"
            OnClick="btnSubmit_Click" ValidationGroup="SubmitBuilder" />
    </div>
</asp:Content>

